package invalidservicedependency;

import invalidservicedependency.InvalidServiceDependencyMatch;
import org.eclipse.viatra2.emf.incquery.runtime.api.IMatchProcessor;
import sysmodel.BusinessService;
import sysmodel.RestService;

/**
 * A match processor tailored for the InvalidServiceDependency pattern.
 * 
 * Clients should derive an (anonymous) class that implements the abstract process().
 * 
 */
public abstract class InvalidServiceDependencyProcessor implements IMatchProcessor<InvalidServiceDependencyMatch> {
  /**
   * Defines the action that is to be executed on each match.
   * @param pService1 the value of pattern parameter service1 in the currently processed match 
   * @param pService2 the value of pattern parameter service2 in the currently processed match 
   * 
   */
  public abstract void process(final BusinessService service1, final RestService service2);
  
  @Override
  public void process(final InvalidServiceDependencyMatch match) {
    process(match.getService1(), match.getService2());  				
    
  }
}
